# -*- codeing = utf-8 -*-
# @Time : 2022/12/21 20:44
# @Author : 小马
# @File: Adc.py
# @Software : PyCharm
import pygame
class Adc(pygame.sprite.Sprite):
    def __init__(self,lasttime):
        super(Adc,self).__init__()
        self.image=pygame.image.load('material/character1.1.1.PNG').convert_alpha()
        self.images=[pygame.image.load('material/character1.1.{:d}.PNG'.format(i)).convert_alpha() for i in range(1,9)]
        self.rect=self.images[0].get_rect()
        self.rect.top=120
        self.rect.left=480
        self.lasttime=lasttime
    def update(self,*args):
        if args[0]%6==0:
            i=int(args[0]/8)
            self.image=self.images[i%len(self.images)]